﻿using System;

namespace ProjectAutumn.Window
{
    public abstract class WindowDevice : DeviceBase
    {
        protected Game Game;
        private string title;
        protected WindowDevice(Game game) { Game = game; }
        public abstract IntPtr Handle { get; }
        public string Title
        {
            get { return title; }
            set
            {
                title = value;
                SetTitle(value);
            }
        }
        public float AspectRatio
        {
            get { return (float)Width / Height; }
        }
        protected internal abstract void ApplyChanges(int width, int height, bool fullscreen);
        public abstract int Width { get; }
        public abstract int Height { get; }
        public abstract void SetTitle(string value);
        public abstract void Run();
        public abstract void GlFlip();
        public abstract WindowCapabilities WindowCapabilities { get; }
    }
}
